<?
require_once $_SESSION['app_root']."../config/app.config.php";
$qString = "
			
			";
/*
$db = new AppDatabase();
	$domains = $db->rawSelect("SELECT `id`, `name` FROM domains WHERE `name` LIKE '%".$_GET['query']."%'");
$db->close();
*/
$totalCount = sizeof($domains);
$names = "";
foreach($domains as $domain){
	$names .= ',{"name":"'.$domain['name'].'", "ID":"'.$domain['id'].'"}';
}
$names = substr($names,1);
$callback = $_GET['callback'];
?>
<?=$callback?>({
    "totalCount":"<?=$totalCount?>",
    "Names":[
        <?=$names?>
    ]
})